define([
    "esri/layers/WebTileLayer", "esri/geometry/Extent"
], function(WebTileLayer, Extent) {
    var webTileLayer = WebTileLayer.createSubclass({
        constructor: function(options, mapView) {
            Object.assign(this, options);

            options.spatialReference = options.spatialReference || mapView.getView().spatialReference.wkid;
            if ([4326, 4490].includes(options.spatialReference)) {
                this.fullExtent = new Extent(-180.0, -90.0, 180.0, 90.0, options.spatialReference);
                this.tileInfo = mapView.mapUtils.getTDTTileInfo(mapView)
            }
        }
    });
    return webTileLayer;
});